<?php
namespace ff\helpers;

class JsonParser
{

    private $incomStrs;
    private $incomVars;

    public function __construct()
    {
    }

    public function __invoke($outVars)
    {
        return $this->parse($outVars);
    }

    public function echo($outVars)
    {
        return $this->parse($outVars);
    }
    public function parse($incomStrs = NULL)
    {
        $this->incomStrs = $incomStrs !== null ? $incomStrs :$this->incomStrs;
        return json_encode($this->incomStrs,true);
    }

}
